home *** CD-ROM | disk | FTP | other *** search
File List | 1993-06-11 | 1.6 KB | 44 lines |
- '
- ' This example file demonstrates -On break cont- ,-On error gosub-
- ' and to quit with -System-. It's recommended that you have this file as
- ' a header file and have your program at label Continue when you want to
- ' compile a file with Mnilu.
- '
- '
- Let Editor=1 ! Editor=1 -> ran from the editor
- ' ! change it into Editor=0
- ' ! before you save it to compile
- '
- If Editor=0
- On Break Cont ! Stop the break [Control][Shift][Alternate]
- Endif
- On Error Gosub Error_here ! On any error go to the error handler
- Goto Continue ! Continue with the real program
- '
- Procedure Error_here ! The error handling routine (.PRG progs)
- Local Result
- Alert 3,"| Error no "+Str$(Err)+" !|",1,"End",Result
- If Result=1
- @End_prog ! It's best to quit after such an error!
- Endif
- Resume Xxxx ! Re-continue with the program from label Xxxx
- Return ! You can also use Resume next to restart
- ' ! at the next instruction
- Procedure End_prog
- If Editor=1 ! If ran from the editor then return to it
- End
- Endif
- System ! Terminate the program (to the Desktop)
- Return
- '
- ' Your program:
- '
- Continue: ! Insert you program here ,when you want to
- ' ! quit then call the End_prog procedure!
- ' ->
- '
- '
- '
- '
- @End_prog
-